﻿@using RadzenBlazorDemos.Models.Northwind

@inherits DbContextPage

<div class="rz-p-12 rz-text-align-center">
    <RadzenDropDownDataGrid @bind-Value=@value Data=@customers TextProperty="CompanyName" ValueProperty="CustomerID"
                            AllowColumnResize="true" AllowFilteringByAllStringColumns="true">
        <Columns>
            <RadzenDropDownDataGridColumn Property="CustomerID" Title="CustomerID" Width="100px" />
            <RadzenDropDownDataGridColumn Property="CompanyName" Title="CompanyName" Width="200px" />
            <RadzenDropDownDataGridColumn Property="City" Title="City" Width="100px" />
            <RadzenDropDownDataGridColumn Property="Country" Title="Country" Width="100px" />
        </Columns>
    </RadzenDropDownDataGrid>
</div>

@code {
    string value = "AROUT";
    IEnumerable<Customer> customers;

    protected override async Task OnInitializedAsync()
    {
        await base.OnInitializedAsync();

        customers = dbContext.Customers;
    }
}